package com.team.runsfast.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Description:
 * @Author: 邢朋辉
 * @Date: 2022/09/22 13:09:50
 */
@Data
@NoArgsConstructor
@TableName("t_orderitem")
public class OrderItem {
    /**订单详情序号*/
    @TableId(type = IdType.AUTO)
    private Long id;
    /**订单序号*/
    private Long oid;
    /**商品ID*/
    private Long gid;
    /***/
    private Integer num;
    /***/
    private Double price;
    /***/
    private Double freemoney;
    /***/
    private Date ctime;

    public OrderItem(Long oid, Long gid, Integer num, Double price, Double freemoney) {
        this.oid = oid;
        this.gid = gid;
        this.num = num;
        this.price = price;
        this.freemoney = freemoney;
        this.ctime=new Date();

    }
}